import request from '@/utils/request'
// 超时规则列表
export function getRuleList(data: any) {
  return request({
    url: '/scrm-api/console/riskmonitoring/timeout-remind/rule-list',
    method: 'POST',
    data
  })
}
// 删除超时规则
export function delRule(data: any) {
  return request({
    url: '/scrm-api/console/riskmonitoring/timeout-remind/del-rule',
    method: 'POST',
    data
  })
}

//---------------统计--------------
//触发次数人数统计
export function getBasicData(data: any) {
  return request({
    url: '/scrm-api/console/riskmonitoring/timeout-remind/statistics/basic-data',
    method: 'GET',
    params: data
  })
}

//触发员工列表
export function executorList(data: any) {
  return request({
    url: '/scrm-api/console/riskmonitoring/timeout-remind/statistics/executor-list',
    method: 'POST',
    data
  })
}

//趋势图
export function trensChart(data: any) {
  return request({
    url: '/scrm-api/console/riskmonitoring/timeout-remind/statistics/trend-chart',
    method: 'POST',
    data
  })
}

//触发详情-客户列表
export function custList(data: any) {
  return request({
    url: '/scrm-api/console/riskmonitoring/timeout-remind/statistics/cust-list',
    method: 'POST',
    data
  })
}

//触发员工-导出
export function excutorExport(data: any) {
  return request({
    url: '/scrm-api/console/riskmonitoring/timeout-remind/statistics/executor-export',
    method: 'POST',
    data
  })
}

//触发详情-客户导出
export function custExport(data: any) {
  return request({
    url: '/scrm-api/console/riskmonitoring/timeout-remind/statistics/cust-export',
    method: 'POST',
    data
  })
}

// 新建规则
export function createRule(data: any) {
  return request({
    url: '/scrm-api/console/riskmonitoring/timeout-remind/create-rule',
    method: 'POST',
    data
  })
}

// 超时规则详情
export function getRuleDetailApi(data: any) {
  return request({
    url: '/scrm-api/console/riskmonitoring/timeout-remind/rule-detail',
    method: 'GET',
    params: data
  })
}

// 编辑规则
export function editRule(data: any) {
  return request({
    url: '/scrm-api/console/riskmonitoring/timeout-remind/edit-rule',
    method: 'POST',
    data
  })
}